<%-- 
    Document   : AdminStatistic
    Created on : Aug 10, 2012, 9:03:09 PM
    Author     : Administrator
--%>


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="/WEB-INF/taglib139.tld" prefix="pg" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Statistic</title>
        <link type="text/css" href="CSS/humanity/jquery-ui-1.8.17.custom.css" rel="stylesheet" />
        <link type="text/css" href="CSS/Style.css" rel="stylesheet" />
        <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.17.custom.min.js"></script>
        <script type="text/javascript" src="js/jquery-1.6.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script>
        <script type="text/javascript" src="js/additional-methods.js"></script>
        <script type="text/javascript" src="js/jquery.validate.js"></script>
        <script>
            $(function() {
                $("#date").datepicker({ dateFormat: 'dd/mm/yy' });
                $("#dates").datepicker({ dateFormat: 'dd/mm/yy' });
                $("#testForm").validate({
                    rules:{
                        txtStarts: {
                            required:true
                        },
                        txtEnds: {
                            required:true
                        }
                    }
                })
            });

        </script>


    </head>
    <body>
        <div id="main"><!-- start header -->
            <div id="header">
                <div id="logo">
                    <img style="border: none;" src="images/logo1.png" alt=""/>
                </div>
                <div id="menu">
                    <ul><li><a href="AdminAdministrator.jsp">Administrator</a></li>
                        <li><a href="AdminCustomer.jsp">Customer</a></li>
                        <li><a href="AdminEvents.jsp">Events</a></li>
                        <li><a href="AdminiFeedBack.jsp">Feebacks</a></li>
                        <li><a href="AdminEventCustomer.jsp">Event Customer</a></li>
                        <li><a href="#">About</a></li>
                    </ul>
                </div>
                <!-- end header -->
            </div>
            <!-- start page -->
            <div id="top"></div>
            <div id="page">
                <!-- start sidebar two -->
                <div id="sidebar2" class="sidebar">
                    <jsp:include page="temp/login2.jsp" />
                </div>
                <!-- end sidebar two -->
                <!-- start content -->
                <div id="content">
                    <%
                        String user = (String) session.getAttribute("aha");
                        if (user == null) {
                            response.sendRedirect("Logout.jsp");
                        }
                    %>
                    <div class="entry">
                        <div id="header2" >Management Statistic</div>
                        <div align="right">
                            <form action="Controllers" method="post" id="testForm">
                                <label style="width:60px">Search date:From</label>
                                <input type="text"  name="txtStart" id="date"  style="width:100px" />To
                                <input type="text" name="txtEnd" id="dates" style="width:100px" />
                                <input type="submit" name="btAction" value="FindDate" style="height:20px"/>

                            </form>
                        </div>
                        <br/>
                        <hr/>
                        <br/>
                        <c:if test="${empty requestScope.EventHaha}">
                            <div align="center">
                                <table  style="width:100%" boder="1px">
                                    <tr id="rowTable">
                                        <th>Event</th>
                                        <th>Event Name</th>
                                        <th>Number of participants</th>
                                        <th></th>
                                    </tr>

                                    <c:if test="${empty requestScope.Timha}">
                                        <pg:paging pageSize="5">

                                            <jsp:useBean id="FeedBack" class="Models.adapterFeedBack"></jsp:useBean>
                                            <c:forEach items="${FeedBack.allReportFeebback}" var="f">
                                                <pg:item>
                                                    <tr id="rowTable">
                                                        <th>${f.event.codeEvent}</th>
                                                        <th>${f.event.nameEvent}</th>
                                                        <th>${f.mark}</th>
                                                        <c:url var="Detail" value="Controllers" >
                                                            <c:param name="txtCode" value="${f.event.codeEvent}"></c:param>
                                                            <c:param name="btAction" value="Details"></c:param>
                                                        </c:url>
                                                        <th><a href="${Detail}">Detail</a></th>
                                                    </tr>
                                                </pg:item>
                                            </c:forEach>

                                            <pg:index>
                                                <pg:page><%=thisPage%></pg:page>
                                                <pg:firstPage>[First]</pg:firstPage>
                                                <pg:lastPage>[Last]</pg:lastPage>
                                            </pg:index>
                                        </pg:paging>
                                    </c:if>
                                    <c:if test="${not empty requestScope.Timha}">
                                        <pg:paging pageSize="5">
                                            <c:forEach items="${requestScope.Timha}" var="f">
                                                <pg:item>
                                                    <tr id="rowTable">
                                                        <th>${f.codeEvent}</th>
                                                        <th>${f.mark}</th>
                                                        <c:url var="Detail" value="Controllers" >
                                                            <c:param name="txtCode" value="${f.codeEvent}"></c:param>
                                                            <c:param name="btAction" value="Details"></c:param>
                                                        </c:url>
                                                        <th><a href="${Detail}">Detail</a></th>
                                                    </tr>
                                                </pg:item>
                                            </c:forEach>

                                            <pg:index>
                                                <pg:page><%=thisPage%></pg:page>
                                                <pg:firstPage>[First]</pg:firstPage>
                                                <pg:lastPage>[Last]</pg:lastPage>
                                            </pg:index>
                                        </pg:paging>
                                    </c:if>            

                                </table>

                            </div>
                        </c:if> 
                        <div align="left">
                    <table style="width: 100%">
                        <c:if test="${not empty requestScope.EventHaha}">
                            <c:forEach items="${requestScope.EventHaha}" var="c">
                                <tr id ="rowTable">
                                    <th colspan="2" align="center" >Information Detail</th>
                                </tr>
                                <tr id ="rowTable" align="left">
                                    <th>Name Event</th>
                                    <th align="left">${c.nameEvent}</th>
                                </tr>
                                <tr align="left" id ="rowTable">
                                    <th>Introduction</th>
                                    <th align="left">${c.introduction}</th>

                                </tr>
                                    <tr  id ="rowTable" align="left">
                                    <th>Date</th>
                                    <th align="left">${c.date}</th>

                                </tr>
                                
                                <tr id ="rowTable">
                                    <th colspan="2" align="left">
                                        <a href="AdminStatistic.jsp"> <<&nbsp;Back</a>
                                    </th>
                                </tr>
                            </c:forEach>
                        </c:if>
                    </table>
                </div>
                </div>
            </div>
            <!-- end content -->

            <div style="clear: both;">&nbsp;</div>

        </div>
        <div id="bottom"></div>
        <!-- end page -->
        <!-- start footer -->
        <div id="footer">
            <p>Copyright ; 2012. <a href="#">Group</a> | <a href="#">Blue_Pumpkin </a> | <a href="" title=""><abbr title="Language">JSP and Servlet</abbr></a> | <a href="" title=""><abbr title="">CSS</abbr></a></p>
            <p>Design by <!-- Do not Remove -->
                <a href="" title="FPT - Aptech"></a>
                <!--End of notice -->
            </p>
        </div>
    </div>
    <!-- end footer -->
</body>
</html>
